package com.atguigu.hellomp;

import com.atguigu.hellomp.entity.User;
import com.atguigu.hellomp.mapper.UserMapper;
import com.atguigu.hellomp.service.UserService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;

@SpringBootTest
public class T1 {

    @Autowired
    UserMapper userMapper;

    @Autowired
    UserService userService;

    @Test
    public void a(){
        System.out.println("=================");
        List<User> users = userMapper.selectList(null);
        System.out.println(users);
    }

    @Test
    public void b(){
        List<User> users = userMapper.selectEmail(null);
        System.out.println(users);
    }

    @Test
    public void c(){
        List<User> list = userService.list();
        User user = userService.getById(1);
        System.out.println(list);
        System.out.println(user);
    }
}
